var common = require('./common');
var store = common.store;
var getFile = common.getFile;

module.exports = {

  // mock freeMarker 文件
  'get /admin/login.html': function(req, res) {
    this.render.ftl(getFile('login'), store);
  },
  'get /admin/login.do': function(req, res) {
    res.send({
      "result": "success",
      "messages": [],
      "fieldErrors": {},
      "errors": [],
      "data": [{
        id: 1,
        pId: 0,
        name: "枪械大全",
        isParent: true,
        open: true
      }, {
        id: 2,
        pId: 1,
        name: "机枪",

        open: true
      }, {
        id: 3,
        pId: 1,
        name: "手枪"
      }, {
        id: 4,
        pId: 1,
        name: "冲锋枪"
      }, {
        id: 5,
        pId: 0,
        isParent: true,
        name: "最新攻略"
      }, {
        id: 6,
        pId: 5,
        isParent: true,
        name: "PVP"
      }, {
        id: 7,
        pId: 6,
        name: "战歌峡谷"
      }, {
        id: 8,
        pId: 6,
        name: "阿拉希"
      }, {
        id: 9,
        pId: 6,
        name: "奥山"
      }, {
        id: 10,
        pId: 5,
        name: "PVE"
      }]
    });
  }

};
